using System;
using System.Runtime.InteropServices;
using System.Text;

namespace Pegasus.Windows.API
{
	/// <summary>
	/// This class is the p/invoke Windows API for the shlwapi.dll
	/// </summary>
	public static class ShlWApi
	{
		// 
		
		/// <summary>
		/// Takes a STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, 
		/// and places the result in a buffer.
		/// </summary>
		/// <param name="pstr">The PSTR.</param>
		/// <param name="pidl">The pidl.</param>
		/// <param name="pszBuf">The PSZ buf.</param>
		/// <param name="cchBuf">The CCH buf.</param>
		/// <returns></returns>
		[DllImport( "shlwapi.dll", EntryPoint = "StrRetToBuf", ExactSpelling = false, CharSet = CharSet.Auto, SetLastError = true )]
		public static extern Int32 StrRetToBuf( IntPtr pstr, IntPtr pidl, StringBuilder pszBuf, int cchBuf );
	}
}
